﻿namespace SUNRPA.CONTROLS.IMPL.domain.flowItemParam {
    [Serializable]
    public class ClickWebEleNParam : BaseParam {
         //0左键、1右键
        private int buttonType;
        //0单机、1双击
        private int clickType;
        private string webObj = "{webPage}";
        private Element webEle;
        private string waitEleTime = "20";

        public string WebObj {
            get => webObj;
            set {
                webObj = value;
                NotifyPropertyChanged("WebObj");
            }
        }
        public Element WebEle {
            get => webEle;
            set {
                webEle = value;
                NotifyPropertyChanged("WebEle");
            }
        }

        public string WaitEleTime {
            get => waitEleTime; 
            set { 
                waitEleTime = value;
                NotifyPropertyChanged("WaitEleTime");
            }  
        }

         public int ButtonType {
            get => buttonType; 
            set { 
                buttonType = value;
                NotifyPropertyChanged("ButtonType");
            }  
        }
         public int ClickType {
            get => clickType; 
            set { 
                clickType = value;
                NotifyPropertyChanged("ClickType");
            }  
        }

        
        public string GetTranslateButtonType() {
            switch(this.buttonType) {
                case 0:
                    return "左键";
                case 1:
                    return "右键";
                default : return "左键";
            }
        }
        public string GetTranslateClickType() {
            switch(this.clickType) {
                case 0:
                    return "单击";
                case 1:
                    return "双击";
                default : return "单击";
            }
        }
    }
}
